[root@xxx~]# test 1 = 1 -a 0 = 1
[root@xxx~]# if [1 = 1 -a 0 = 1]then echo 1;else echo 2;fi
-bash: syntax error near unexpected token `else'
上面test为何没有返回结果,if语句又报错?
|
|
上面 |
||
|
|
|
|
而且
等价地还可以写成:
注意
|
||
|
|